package com.slz3.business.module.memberManagement.memShoppingCar.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.memberManagement.memShoppingCar.domain.MemShoppingCar;
import com.slz3.business.module.memberManagement.memShoppingCar.domain.MemShoppingCarCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class MemShoppingCarResAtomic {

    static Mono<ServerResponse> add_$MemShoppingCarUpdateLock(ServerRequest req, MemShoppingCar memShoppingCar) {
        return MemShoppingCarResSafeValid.add(req, memShoppingCar) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemShoppingCarResExecutor.add(req, memShoppingCar);
    }

    public static Mono<ServerResponse> delete_$MemShoppingCarUpdateLock(ServerRequest req, MemShoppingCarCondition memShoppingCarCondition) {
        return MemShoppingCarResSafeValid.delete(req, memShoppingCarCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemShoppingCarResExecutor.delete(req);
    }

    static Mono<ServerResponse> modify_$MemShoppingCarUpdateLock(ServerRequest req, MemShoppingCar memShoppingCar) {
        return MemShoppingCarResSafeValid.modify(req, memShoppingCar) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemShoppingCarResExecutor.modify(req, memShoppingCar);
    }

    static Mono<ServerResponse> info_$MemShoppingCarUpdateLock(ServerRequest req) {
        return MemShoppingCarResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemShoppingCarResExecutor.info(req);
    }

    public static Mono<ServerResponse> auditSubmit_$MemShoppingCarUpdateLock(ServerRequest req, MemShoppingCarCondition memShoppingCarCondition) {
        return MemShoppingCarResSafeValid.auditSubmit(req, memShoppingCarCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemShoppingCarResExecutor.auditSubmit(req);
    }

    public static Mono<ServerResponse> audit_$MemShoppingCarUpdateLock(ServerRequest req, MemShoppingCarCondition memShoppingCarCondition) {
        return MemShoppingCarResSafeValid.audit(req, memShoppingCarCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemShoppingCarResExecutor.audit(req);
    }

    public static Mono<ServerResponse> auditReject_$MemShoppingCarUpdateLock(ServerRequest req, MemShoppingCarCondition memShoppingCarCondition) {
        return MemShoppingCarResSafeValid.auditReject(req, memShoppingCarCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemShoppingCarResExecutor.auditReject(req);
    }


    public static Mono<ServerResponse> usingEnable_$MemShoppingCarUpdateLock(ServerRequest req, MemShoppingCarCondition memShoppingCarCondition) {
        return MemShoppingCarResSafeValid.usingEnable(req, memShoppingCarCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemShoppingCarResExecutor.usingEnable(req);
    }

    public static Mono<ServerResponse> usingDisable_$MemShoppingCarUpdateLock(ServerRequest req, MemShoppingCarCondition memShoppingCarCondition) {
        return MemShoppingCarResSafeValid.usingDisable(req, memShoppingCarCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemShoppingCarResExecutor.usingDisable(req);
    }
}
